<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>EasyWasmPlayer</title>
    <script src="./EasyWasmPlayer.js"></script>
</head>

<body>
    <div style="width:100%; height: 400px;">
        <div id="newplay" onClick="onplay"></div>
        <input type="hidden" id="value" value="http://192.168.1.231:18000/flv/hls/stream_4_0.flv">
        <!--<button id="btn">播放</button>-->
    </div>
    <script>
        // 播放器回调函数
        callbackfun = function (e) { 
            console.log(e);
        }
        // 播放按钮
        var btn = document.getElementById('btn'); 
        // 地址栏
        var value = document.getElementById('value');
        // 实例播放器
        var player = new WasmPlayer(null, 'newplay', callbackfun,{
            Height:true
        })
        //播放事件 传入地址播放
        btn.onclick = function(){
            player.play(value.value,1);
            console.log(value.value);
        }

        //播放
        function playUrl(param) {
            player.play(value.value,1);
            console.log(value.value);
        }
    
    </script>
</body>
</html>